home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / tcsh / dist / RCS / Makefile.sun4,v < prev    next >
Encoding:
Makefile  |  1992-12-18  |  12.8 KB  |  445 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    jhh:1.1; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.1
  10. date     92.12.18.15.20.57;  author jhh;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @@
  17.  
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @# $Id: Makefile,v 1.1 92/12/18 14:23:21 jhh Exp Locker: jhh $
  26. #    Makefile    4.3    6/11/83
  27. #
  28. # C Shell with process control; VM/UNIX VAX Makefile
  29. # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
  30. #
  31. # With an input editor, command completion, etc. and ported to all sorts of
  32. # things; Paul Placeway, CIS Dept., Ohio State University
  33. #
  34. SHELL=/bin/sh
  35. VERSION=6.01
  36. BUILD=tcsh
  37.  
  38. ################################################################
  39. ## CFLAGS.  For various -D things, see config.h
  40. ################################################################
  41. #
  42. # These are the default suffixes from .c to .o and -c to get there
  43. # but to use the global optimizer on the mips boxes, see below
  44. #
  45. SUF=o
  46. CF=-c
  47.  
  48. INCLUDES=-I. -I..
  49.  
  50. #ifdef mips
  51. INCLUDES += -I/sprite/lib/include/ds3100.md /sprite/lib/include
  52. #endif
  53.  
  54. LFLAGS=$(INCLUDES)
  55. #LFLAGS=$(INCLUDES) -Zn10000        # hpux lint
  56.  
  57.  
  58. #CFLAGS= $(INCLUDES) -g            # debug
  59. #CFLAGS= $(INCLUDES) -O            # production
  60. #CFLAGS= $(INCLUDES)             # Broken optimizers....
  61.  
  62. #CFLAGS= -g -pg $(INCLUDES) -DPROF
  63. #CFLAGS= -O -pg $(INCLUDES) -DPROF
  64.  
  65. # gcc 1.37-
  66. #CFLAGS=-O $(INCLUDES) -finline-functions -fstrength-reduce 
  67.  
  68. # gcc 1.37+
  69. #ifdef sun4
  70. CFLAGS=-O $(INCLUDES) -fcombine-regs -finline-functions -fstrength-reduce 
  71. #endif
  72. # add -msoft-float for 68881 machines.
  73.  
  74. #hpux 8.0
  75.  
  76. #CFLAGS=  $(INCLUDES) +O3 -Aa
  77.  
  78. # for silicon graphics (and other mips compilers) -- use the
  79. # global optimizer! (-O3).
  80. # On SGI 4.0+ you need to add -D__STDC__ too.
  81. #CFLAGS= -O3 $(INCLUDES) 
  82. #CF=-j
  83. #SUF=u
  84. #.SUFFIXES: .u                 ## Ultrix needs that
  85.  
  86. # mips systems
  87. #ifdef mips
  88. CFLAGS= $(INCLUDES) -O -systype bsd43 -Wf,-XNd5000 -Wf,-XNp6000 -Olimit 2000 -Dsprite -Uultrix
  89. #endif
  90.  
  91. # for at&t machines
  92. #CFLAGS= -O -Ksd $(INCLUDES)
  93.  
  94. # for convexen
  95. #CFLAGS= $(INCLUDES) -ext -tm c1
  96.  
  97. # Stardent Titan
  98. #CFLAGS = $(INCLUDES) -O -43
  99.  
  100. # Stardent Stellar
  101. #CFLAGS = $(INCLUDES) -O4
  102.  
  103. # Apollo's with cc [apollo builtins don't work with gcc]
  104. # and apollo should not define __STDC__ if it does not have
  105. # the standard header files. RT's (aos4.3) need that too;
  106. # you might want to skip the -O on the rt's... Not very wise.
  107. # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA)
  108. #DFLAGS=-U__STDC__ 
  109. #DFLAGS=-D_IBMESA
  110. # On aix2.2.1 we need more compiler space.
  111. #DFLAGS=-Nd4000 -Nn3000
  112. DFLAGS=
  113.  
  114.  
  115. ################################################################
  116. ## LDLAGS.  Define something here if you need to
  117. ################################################################
  118. LDFLAGS=             ## The simplest, suitable for all.
  119. #LDFLAGS= -s            ## Stripped. Takes less space on disk.
  120. #LDFLAGS= -s -n            ## Pure executable. Spares paging over
  121. #                 ## the network for machines with local
  122. #                ## swap but external /usr/local/bin .
  123. #LDFLAGS= -s -n -Bstatic    ## Without dynamic links. (SunOS)
  124.  
  125. ################################################################
  126. ## LIBES.  Pick one, or roll your own.
  127. ################################################################
  128. LIBES= -ltermcap        ## BSD style things, hpux
  129. #LIBES= -ltermcap -lcs        ## Mach
  130. #LIBES= -lcurses        ## Sys V3 w/o networking (and Sys V4)
  131. #LIBES= -lcurses -lc /usr/ucblib/libucb.a ## Sys V4 with BSDTIMES
  132. #LIBES= -lcurses        ## Sys V4 w/o BSDTIMES
  133. #LIBES= -lcurses -lnet        ## Sys V3 with networking
  134. #LIBES= -lcurses -ldir        ## Sys V2 w/o networking [needs directory lib]
  135. #LIBES= -lcurses -ldir -lnet    ## Sys V2 with networking [needs directory lib]
  136. #LIBES= -lcurses -lsocket -lbsd    ## Amdahl UTS 2.1
  137. #LIBES= -lcurses -lbsd        ## For Irix3.1 on SGI-IRIS4D or ETA10
  138. #LIBES= -lcurses -lsun -lbsd -lc_s ## For Irix3.3 on SGI-IRIS4D (w/ yp)
  139. #LIBES= -lcurses -lbsd -lc_s    ## For Irix3.3 on SGI-IRIS4D (wo/ yp)
  140. #LIBES= -lcurses -lbsd        ## For aix on an IBM 370 or rs6000 or ps2
  141. #LIBES= -lcurses        ## For aix on the rt
  142. #LIBES= -lcurses -lcposix    ## ISC 2.2 
  143. #LIBES= -lcposix -lc_s -lcurses -linet ## ISC 2.2 with networking
  144. #LIBES= -lcurses -linet -lc_s   ## ISC 2.0.2 with networking
  145. #LIBES= -ltermcap -ldir -lx    ## Xenix 386 style things
  146. #LIBES= -lcurses -lintl        ## SCO SysVR3.2v2.0
  147. #LIBES= -lcurses -lintl -lsocket ## SCO+ODT1.1
  148. #LIBES= -lposix -ltermcap    ## A/UX 2.0
  149. #LIBES= -ltermcap -lseq        ## Sequent's Dynix
  150. #LIBES= -lcurses -lsocket    ## Intel's hypercube and ns32000 based Opus.
  151. #LIBES= -ldirent -lcurses       ## att3b1 stk cc w/o shared lib & directory lib
  152. #LIBES= -shlib -ldirent -lcurses ## att3b1 gcc1.40 w/ shared lib & directory lib
  153. #LIBES=                ## Minix.
  154. #LIBES= -lcurses        ## For a stellar
  155.  
  156.  
  157. # The difficult choice of a c-compiler...
  158. # First, you should try your own c-compiler. 
  159. # Gcc -traditional is also a safe choice. 
  160. # If you think that you have good include files try gcc -Wall...
  161. # If you want to take out -traditional, make sure that your sys/ioctl.h
  162. # is fixed correctly, otherwise you'll be stopped for tty input!
  163. #ifdef sun4
  164. CC=    gcc -Wall 
  165. #endif
  166. #ifdef mips
  167. CC = cc
  168. #endif
  169. #CC=    cc
  170. #CC=    occ
  171. #CC=    /bin/cc    # For suns, w/o gcc and SVR4
  172. #CC=    /usr/lib/sun.compile/cc  # FPS 500 (+FPX) with Sun C compiler
  173. ED=    -ed
  174. AS=    -as
  175. RM=    -rm
  176. CXREF=    /usr/ucb/cxref
  177. VGRIND=    csh /usr/ucb/vgrind
  178. CTAGS=    /usr/ucb/ctags
  179. #XSTR= /usr/ucb/xstr
  180. SCCS=    /usr/local/sccs
  181. PARALLEL=12                # Make the multi-max run fast.
  182. #P=&                    # Use Sequent's parallel make
  183. P=
  184. DESTDIR=/sprite
  185. MANSECT=1
  186. DESTBIN=${DESTDIR}/bin
  187. DESTMAN=${DESTDIR}/man/cmds
  188. FTPAREA=/usr/spool/ftp
  189.  
  190. ASSRCS=    sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
  191.     sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
  192.     sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
  193.     sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h 
  194. PSSRCS= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h
  195. SHSRCS= ${ASSRCS} ${PSSRCS}
  196. SHOBJS=    sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
  197.     sh.char.${SUF} sh.exp.${SUF} sh.func.${SUF} sh.glob.${SUF} \
  198.     sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} sh.misc.${SUF} \
  199.     sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} sh.sem.${SUF} \
  200.     sh.set.${SUF} sh.time.${SUF} glob.${SUF} mi.termios.${SUF}
  201.  
  202. TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c
  203. TWOBJS=    tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF}
  204.  
  205. EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
  206.     ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
  207. EDOBJS=    ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
  208.     ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
  209.  
  210. TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
  211.     tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
  212.     tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
  213.     tc.who.c tc.h
  214. TCOBJS=    tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.disc.${SUF} \
  215.     tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \
  216.     tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
  217.     tc.vers.${SUF} tc.who.${SUF} 
  218.  
  219. PVSRCS= Makefile
  220. AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \
  221.     WishList config_f.h eight-bit.me glob.3 patchlevel.h \
  222.     pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
  223.     README.imake
  224. VHSRCS=${PVSRCS} ${AVSRCS}
  225.  
  226. CONFSRCS=config/config.* 
  227.  
  228. ALLSRCS=  ${SHSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${VHSRCS}
  229. DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${AVSRCS}
  230.  
  231.  
  232. OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
  233.  
  234.  
  235. all: ${BUILD}
  236.  
  237. tcsh:$(P) ${OBJS} 
  238.     rm -f tcsh core
  239.     ${CC} ${LDFLAGS} ${CFLAGS} ${OBJS} -o tcsh ${LIBES}
  240.  
  241. tcsh.ps: tcsh.1
  242.     rm -f tcsh.ps
  243.     -ptroff -man tcsh.1 > tcsh.ps
  244.  
  245.  
  246. .c.${SUF}:
  247.     ${CC} ${CF} ${CFLAGS} ${DFLAGS} $<
  248.  
  249. # Don't do any special massaging of C files for sharing of strings!!
  250. # it causes weird segmentation faults on some systems.
  251. #.c.o:
  252. #    ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  253. #    ${CC} ${CF} ${CFLAGS} x.c 
  254. #    mv -f x.o $*.o
  255. #    rm -f x.c
  256.  
  257. #ed.init.o: ed.init.c
  258. #    ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  259. #    ${CC} -R ${CF} ${CF} x.c 
  260. #    mv -f x.o $*.o
  261. #    rm -f x.c
  262.  
  263. #strings.o: strings
  264. #    ${XSTR}
  265. #    ${CC} -c -R xs.c
  266. #    mv -f xs.o strings.o
  267. #    rm -f xs.c
  268.  
  269. ##.DEFAULT:
  270. ##    ${SCCS} get $<
  271.  
  272. ##.DEFAULT:
  273. ##    co $<
  274.  
  275. ed.defns.h: ed.defns.c
  276.     @@rm -f $@@
  277.     @@echo '/* Do not edit this file, make creates it. */' > $@@
  278.     @@echo '#ifndef _h_ed_defns' >> $@@
  279.     @@echo '#define _h_ed_defns' >> $@@
  280.     egrep '[FV]_' ed.defns.c | egrep '^#define' >> $@@
  281.     @@echo '#endif /* _h_ed_defns */' >> $@@
  282.  
  283. sh.err.h: sh.err.c
  284.     @@rm -f $@@
  285.     @@echo '/* Do not edit this file, make creates it. */' > $@@
  286.     @@echo '#ifndef _h_sh_err' >> $@@
  287.     @@echo '#define _h_sh_err' >> $@@
  288.     egrep 'ERR_' sh.err.c | egrep '^#define' >> $@@
  289.     @@echo '#endif /* _h_sh_err */' >> $@@
  290.  
  291. tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h
  292.     @@rm -f $@@
  293.     @@echo '/* Do not edit this file, make creates it. */' > $@@
  294.     ${CC} -E $(INCLUDES) ${DFLAGS} tc.const.c | egrep 'Char STR' | \
  295.         sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
  296.         sort >> $@@
  297.  
  298. csh.prof: ${OBJS} sh.prof.${SUF} mcrt0.${SUF}
  299.     rm -f csh.prof
  300.     ld -X mcrt0.${SUF} ${OBJS} -o csh.prof ${LIBES} -lc
  301.  
  302. sh.prof.${SUF}:
  303.     cp sh.c sh.prof.c
  304.     ${CC} ${CF} ${CFLAGS} -DPROF sh.prof.c
  305.  
  306. lint: tc.const.h ed.defns.h
  307.     lint ${LFLAGS} sh*.c tw*.c ed*.c tc.*.c ${LIBES}
  308.  
  309. print:
  310.     @@pr READ_ME
  311.     @@pr makefile makefile.*
  312.     @@(size -l a.out; size *.${SUF}) | pr -h SIZES
  313.     @@${CXREF} sh*.c | pr -h XREF
  314.     @@ls -l | pr 
  315.     @@pr sh*.h [a-rt-z]*.h sh*.c alloc.c
  316.  
  317. vprint:
  318.     @@pr -l84 READ_ME TODO
  319.     @@pr -l84 makefile makefile.*
  320.     @@(size -l a.out; size *.${SUF}) | pr -l84 -h SIZES
  321.     @@${CXREF} sh*.c | pr -l84 -h XREF
  322.     @@ls -l | pr -l84
  323.     @@${CXREF} sh*.c | pr -l84 -h XREF
  324.     @@pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c
  325.  
  326. vgrind:
  327.     @@cp /dev/null index
  328.     @@for i in *.h; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
  329.     @@for i in *.c; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
  330.     @@vgrind -t -x -h Index index >/crp/bill/csh/index.t
  331.  
  332. install: tcsh 
  333.     -mv  ${DESTBIN}/tcsh  ${DESTBIN}/tcsh.old
  334.     cp tcsh ${DESTBIN}/tcsh
  335.     strip ${DESTBIN}/tcsh
  336.     chmod 555 ${DESTBIN}/tcsh
  337.  
  338. manpage: tcsh.man
  339.     cp tcsh.man ${DESTMAN}
  340.     chmod 444 ${DESTMAN}/tcsh.man
  341.  
  342. clean:
  343.     ${RM} -f a.out strings x.c xs.c tcsh _MAKE_LOG core
  344.     ${RM} -f *.${SUF} sh.prof.c ed.defns.h tc.const.h sh.err.h
  345.  
  346. veryclean: clean
  347.     ${RM} -f *~ #*
  348.  
  349. tags:    /tmp
  350.     ${CTAGS} sh*.c
  351.  
  352. tar:
  353.     rm -f tcsh-${VERSION}.tar.Z
  354.     rm -rf tcsh-${VERSION} 
  355.     mkdir tcsh-${VERSION} tcsh-${VERSION}/config
  356.     cp ${ALLSRCS} tcsh-${VERSION}
  357.     cp ${CONFSRCS} tcsh-${VERSION}/config
  358.     tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
  359.     rm -rf tcsh-${VERSION}
  360.  
  361. shar:    
  362.     rm -f tcsh-*.shar
  363.     rm -rf tcsh-${VERSION} 
  364.     mkdir tcsh-${VERSION} tcsh-${VERSION}/config 
  365.     cp ${ALLSRCS} tcsh-${VERSION}
  366.     cp ${CONFSRCS} tcsh-${VERSION}/config
  367.     MAKESHAR ${VERSION} tcsh-${VERSION}/* tcsh-${VERSION}/config/*
  368.     rm -rf tcsh-${VERSION}
  369.  
  370. tcsh-${VERSION}.tar.Z:
  371.     rm -rf tcsh-${VERSION} 
  372.     rm -f tcsh-${VERSION}.tar tcsh-${VERSION}.tar.Z DIFFS.[123]
  373.     mkdir tcsh-${VERSION}
  374.     ./MAKEDIFFS bsd
  375.     mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh-${VERSION}
  376.     cp ${DISTSRCS} tcsh-${VERSION}
  377.     mkdir tcsh-${VERSION}/config
  378.     cp ${CONFSRCS} tcsh-${VERSION}/config
  379.     cp Makefile tcsh-${VERSION}/Makefile.new
  380.     tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
  381.     rm -rf tcsh-${VERSION}
  382.  
  383. tcsh.tahoe-${VERSION}.tar.Z:
  384.     rm -rf tcsh.tahoe-${VERSION} 
  385.     rm -f tcsh.tahoe-${VERSION}.tar tcsh.tahoe-${VERSION}.tar.Z DIFFS.[123]
  386.     mkdir tcsh.tahoe-${VERSION}
  387.     ./MAKEDIFFS tahoe
  388.     mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.tahoe-${VERSION}
  389.     cp ${DISTSRCS} tcsh.tahoe-${VERSION}
  390.     mkdir tcsh.tahoe-${VERSION}/config
  391.     cp ${CONFSRCS} tcsh.tahoe-${VERSION}/config
  392.     cp Makefile tcsh.tahoe-${VERSION}/Makefile.new
  393.     tar cvf - tcsh.tahoe-${VERSION} | compress > tcsh.tahoe-${VERSION}.tar.Z
  394.     rm -rf tcsh.tahoe-${VERSION}
  395.  
  396. tcsh.reno-${VERSION}.tar.Z:
  397.     rm -rf tcsh.reno-${VERSION} 
  398.     rm -f tcsh.reno-${VERSION}.tar tcsh.reno-${VERSION}.tar.Z DIFFS.[123]
  399.     mkdir tcsh.reno-${VERSION}
  400.     ./MAKEDIFFS reno
  401.     mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.reno-${VERSION}
  402.     cp ${DISTSRCS} tcsh.reno-${VERSION}
  403.     mkdir tcsh.reno-${VERSION}/config
  404.     cp ${CONFSRCS} tcsh.reno-${VERSION}/config
  405.     cp Makefile tcsh.reno-${VERSION}/Makefile.new
  406.     tar cvf - tcsh.reno-${VERSION} | compress > tcsh.reno-${VERSION}.tar.Z
  407.     rm -rf tcsh.reno-${VERSION}
  408.  
  409. ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z
  410.     cp tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z ${FTPAREA}
  411.     cp tcsh.man ${FTPAREA}
  412.  
  413. #
  414. # Dependencies
  415. #
  416. config.h: config_f.h
  417.  
  418. TCH=tc.h tc.const.h tc.decls.h tc.os.h tc.sig.h
  419. SHH=sh.h sh.types.h sh.char.h sh.err.h sh.dir.h sh.proc.h pathnames.h \
  420.     sh.decls.h ${TCH}
  421. TWH=tw.h tw.decls.h
  422. EDH=ed.h ed.decls.h
  423.  
  424. # EDH
  425. EDINC=sh.${SUF} sh.func.${SUF} sh.lex.${SUF} sh.print.${SUF} sh.proc.${SUF} \
  426.       sh.set.${SUF} tc.bind.${SUF} tc.os.${SUF} tc.prompt.${SUF} \
  427.       tc.sched.${SUF} tw.parse.${SUF}
  428. ${EDOBJS} ${EDINC} : ${EDH}
  429.  
  430. # SHH
  431. ${OBJS}: config.h ${SHH}
  432.  
  433. # TWH
  434. TWINC=ed.chared.${SUF} ed.inputl.${SUF} sh.exec.${SUF} sh.func.${SUF} \
  435.       sh.set.${SUF} tc.func.${SUF}
  436. ${TWOBJS} ${TWINC}: ${TWH}
  437.  
  438. # glob.h
  439. glob.${SUF} sh.glob.${SUF}: glob.h
  440.  
  441. # ed.defns.h
  442. EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF}
  443. ${EDOBJS} ${EDDINC}: ed.defns.h
  444. @
  445.